<template>
	<view class="content">
		<view class="container">
			<view class="box">
				<u-cell title="隐私中心" isLink size="large" @click="$goPath(2, '/pagesA/pocketShop/mine/userAgreement?type=1')" />
				<u-cell title="用户协议" isLink size="large" @click="$goPath(2, '/pagesA/pocketShop/mine/userAgreement?type=2')" />
				<!-- <u-cell title="注销账号" isLink size="large" @click="showWarnConfirm = true" /> -->
				<u-cell title="退出登录" isLink size="large" @click="confirmVisible = true" />
				<!-- #ifndef MP-WEIXIN -->
				<u-cell title="当前版本" size="large" :value="appVersion" :border="false" />
				<!-- #endif -->
				<!-- #ifdef MP-WEIXIN -->
				<u-cell title="当前版本" size="large" :value="version_number" :border="false" />
				<!-- #endif -->
				<!-- <button open-type="contact" >
					微信客服
				</button> -->
			<!-- 	<button style="display: contents;" open-type="share">
				            <image src="/static/images/shop.png" style="width: 60rpx;height: 60rpx;margin-left: 20rpx;"></image>
				</button> -->

			</view>
		</view>
		<u-modal :show="confirmVisible" showCancelButton content="确认退出账号?" closeOnClickOverlay @confirm="confirm"
			@cancel="confirmVisible = false"></u-modal>
		<u-modal :show="showWarnConfirm" title="是否确认注销账号" showCancelButton
			content='账号注销后，账号被所有资产及订单数据将被永久抹除，请谨慎操作！确认注销账号请联系优品兜客服电话:400-9915775' @cancel="showWarnConfirm = false"
			@confirm="showWarnConfirm = false"></u-modal>
	</view>
</template>
<script>
	import {
		removeToken,
		removeUserInfo
	} from '@/common/auth';

	export default {
		data() {
			return {
				showWarnConfirm: false,
				appVersion: '',
				confirmVisible: false,
				version_number: ''
			}
		},
		onLoad() {
			this.appVersion = uni.getSystemInfoSync().appVersion;
			// #ifdef MP-WEIXIN
			const accountInfo = uni.getAccountInfoSync();
			console.log(accountInfo, 'accountInfo')
			this.version_number = accountInfo.miniProgram.version // 小程序 版本号
			console.log(accountInfo.miniProgram.version, '小程序版本号')
			// #endif
		},
		methods: {
			confirm() {
				removeToken()
				removeUserInfo()
				this.$goPath(4, '/pages/pocketShop/mine/login')
			}
		},
	}
</script>
<style scoped>
	page {
		background-color: #F6F6F6;
	}

	.container {
		width: 100%;
		height: 100%;
		padding: 24rpx;
		background-color: #F6F6F6;
	}

	.box {
		border-radius: 16rpx;
		font-size: 28rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #333333;
		background-color: #FFF;

	}

	.t-cell__note {
		font-size: 28rpx !important;
		color: #333333 !important;
		font-weight: bold;
		font-family: PingFang SC-Bold, PingFang SC;
	}

	.t-button--text {
		color: #333 !important;
	}

	.t-button--text.t-button--primary {
		color: #32B499 !important;
	}

	.t-dialog__content {
		padding: 20rpx !important;
	}

	.t-dialog__body {
		color: #333333 !important;
		font-size: 28rxp !important;
	}

	.t-dialog__footer--full {
		padding: 0 !important;
	}
	.btn{
		margin: 0;
		padding: 0;
		background: transparent;
		border: none;
	}
	.btn::after{
		border: none;
	}

</style>